package com.mangguo.tingjian.activity.controller;


import com.mangguo.tingjian.activity.dto.ActivityLuckResult;
import com.mangguo.tingjian.activity.service.IDwLuckUserResultAppService;
import com.mangguo.tingjian.common.Result;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 * 中奖汇总 前端控制器
 * </p>
 *
 * @author auto
 * @since 2019-11-29
 */
@RestController
@RequestMapping("/app/activity")
public class DwLuckUserResultAppController {

    @Resource
    private IDwLuckUserResultAppService dwLuckUserResultAppService;

    @GetMapping("/dw-luck-user-result")
    public Result<ActivityLuckResult> getActivityLuckResult(@RequestParam(value = "subChannelId") String subChannelId){
        return Result.success(dwLuckUserResultAppService.getResultBySubChannel(subChannelId));
    }

}
